﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate;

namespace SAKS.UnitTest
{
    public class TestBase
    {
        protected ISessionFactory sessionFactory;

        public TestBase()
        {
            sessionFactory = TestManager.GetInstance().SessionFactory;
            TestManager.RefreshDatabase();
            using (var session = sessionFactory.OpenSession())
            {
                using (var tx = session.BeginTransaction())
                {
                    CreateSomeData(session);
                    tx.Commit();
                }
            }
        }

        protected virtual  void CreateSomeData(ISession session)
        {

        }

    }
}
